<?php switch($content_type){
case 'rm_opr': ?>
<dl>
    <dd class="cp-header">
        <?php echo $text_open_pm_report_intro; ?>
    </dd>
    <dd class="cp-content">
        <?php if(!$open_pm_reports){ ?>
        <dl>
            <dd><?php echo $text_no_pm_reports; ?></dd>
        </dl>
        <?php }else{ ?>
        <form id="view-open-pm-report-form" action="" method="post">
        <dl class="cp-list-heading">
            <dd class="cp-list-heading-first cp-list-first-unindent2"><?php echo $text_heading_view_details; ?></dd>
            <dd class="cp-list-heading-second cp-list-second-expand2"><?php echo $text_heading_reporter; ?></dd>
            <dd class="cp-list-heading-third"><?php echo $text_heading_mark; ?></dd>
        </dl>
        <?php foreach($open_pm_reports as $open_pm_report){ ?>
        <dl class="cp-list">
            <dd class="cp-list-first cp-list-first-unindent">
                <a href="<?php echo $open_pm_report['pm_report_moderating_link']; ?>"><strong><?php echo $open_pm_report['message_subject']; ?></strong></a>
                <br />
                <?php echo $open_pm_report['sent_by']; ?>
                <br />
                <?php echo $text_to; ?>
                <?php $i=0; ?>
                <?php foreach($open_pm_report['receiver_names'] as $receiver_name){ ?>
                <a href="<?php echo $open_pm_report['receiver_profile_urls'][$i]; ?>"><?php echo $receiver_name; ?></a>
                <?php $i++; ?>
                <?php } ?>
            </dd>
            <dd class="cp-list-second cp-list-second-expand">
                <?php echo $open_pm_report['reported_by']; ?>
            </dd>
            <dd class="cp-list-third">
                <input type="checkbox" name="marked_r_id[]" value="<?php echo $open_pm_report['id_str'] ; ?>" />
            </dd>
        </dl>
        <?php } ?>
        <dl class="cp-list-bottom">
            <dd>
                <input class="input-buttons" type="submit" name="delete-reports" value="<?php echo $button_delete; ?>" onclick="{if(confirm('<?php echo $text_confirm_delete; ?>')){this.document.view-open-pm-report-form.submit();return true;}return false;}" />
                &nbsp;&nbsp;
                <input class="input-buttons" type="submit" name="close-reports" value="<?php echo $button_close; ?>" onclick="{if(confirm('<?php echo $text_confirm_close; ?>')){this.document.view-open-pm-report-form.submit();return true;}return false;}" />
            </dd>
            <?php if(count($open_pm_reports)>1){ ?>
            <dd style="float:left;">
                &bull; <a href="#" onclick="marklist('view-open-pm-report-form', 'marked_r', true); return false;"><?php echo $text_mark_all; ?></a>
                &bull; <a href="#" onclick="marklist('view-open-pm-report-form', 'marked_r', false); return false;"><?php echo $text_unmark_all; ?></a>
            </dd>
            <?php } ?>
        </dl>
        </form>
        <?php } ?>
    </dd>
    <div class="forum-pagination"><?php echo $pagination; ?></div>
</dl>
<?php break; ?>
<?php case 'rm_cpr': ?>
<dl>
    <dd class="cp-header">
        <?php echo $text_closed_pm_report_intro; ?>
    </dd>
    <dd class="cp-content">
        <?php if(!$closed_pm_reports){ ?>
        <dl>
            <dd><?php echo $text_no_pm_reports; ?></dd>
        </dl>
        <?php }else{ ?>
        <form id="view-closed-pm-report-form" action="" method="post">
        <dl class="cp-list-heading">
            <dd class="cp-list-heading-first cp-list-first-unindent2"><?php echo $text_heading_view_details; ?></dd>
            <dd class="cp-list-heading-second cp-list-second-expand2"><?php echo $text_heading_reporter; ?></dd>
            <dd class="cp-list-heading-third"><?php echo $text_heading_mark; ?></dd>
        </dl>
        <?php foreach($closed_pm_reports as $closed_pm_report){ ?>
        <dl class="cp-list">
            <dd class="cp-list-first cp-list-first-unindent">
                <a href="<?php echo $closed_pm_report['pm_report_moderating_link']; ?>"><strong><?php echo $closed_pm_report['message_subject']; ?></strong></a>
                <br />
                <?php echo $closed_pm_report['sent_by']; ?>
                <br />
                <?php echo $text_to; ?>
                <?php $i=0; ?>
                <?php foreach($closed_pm_report['receiver_names'] as $receiver_name){ ?>
                <a href="<?php echo $closed_pm_report['receiver_profile_urls'][$i]; ?>"><?php echo $receiver_name; ?></a>
                <?php $i++; ?>
                <?php } ?>
            </dd>
            <dd class="cp-list-second cp-list-second-expand">
                <?php echo $closed_pm_report['reported_by']; ?>
            </dd>
            <dd class="cp-list-third">
                <input type="checkbox" name="marked_r_id[]" value="<?php echo $closed_pm_report['id_str'] ; ?>" />
            </dd>
        </dl>
        <?php } ?>
        <dl class="cp-list-bottom">
            <dd>
                <input class="input-buttons" type="submit" name="delete-reports" value="<?php echo $button_delete; ?>" onclick="{if(confirm('<?php echo $text_confirm_delete; ?>')){this.document.view-closed-pm-report-form.submit();return true;}return false;}" />
            </dd>
            <?php if(count($closed_pm_reports)>1){ ?>
            <dd style="float:left;">
                &bull; <a href="#" onclick="marklist('view-closed-pm-report-form', 'marked_r', true); return false;"><?php echo $text_mark_all; ?></a>
                &bull; <a href="#" onclick="marklist('view-closed-pm-report-form', 'marked_r', false); return false;"><?php echo $text_unmark_all; ?></a>
            </dd>
            <?php } ?>
        </dl>
        </form>
        <?php } ?>
    </dd>
    <div class="forum-pagination"><?php echo $pagination; ?></div>
</dl>
<?php break; ?>
<?php case 'rm_prd': ?>
<form id="pm-report-detail-form" action="" method="post">
<dl>
    <dd class="cp-header">
        <span style="font-size:16px;font-weight:bold;"><?php echo $text_report_reason; ?><?php echo $pm_report_detail['reason_title'] ; ?></span><br />
        <span class="gray-font"><?php echo $pm_report_detail['reported_by']; ?></span><br /><br />
        <?php if($pm_report_detail['report_closed']){ ?>
        <div class="closed-report-bar">
            <?php echo $text_report_closed; ?>
        </div>
        <?php } ?>
        <?php echo $pm_report_detail['report_info']; ?>
        <input type="hidden" name="marked_r_id[]" value="<?php echo $pm_report_detail['id_str'] ; ?>" />
    </dd>
    <dd class="cp-content">
        <span style="font-size:14px;font-weight:bold;"><?php echo $pm_report_detail['message_subject']; ?></span><br />
        <span class="gray-font"><?php echo $pm_report_detail['sent_by']; ?></span><br />
        <span class="gray-font"><?php echo $text_to; ?></span>
        <?php $i=0; ?>
        <?php foreach($pm_report_detail['receiver_names'] as $receiver_name){ ?>
        <a href="<?php echo $pm_report_detail['receiver_profile_urls'][$i]; ?>"><?php echo $receiver_name; ?></a>
        <?php $i++; ?>
        <?php } ?>
        <br />
        <?php echo $pm_report_detail['message_text']; ?>
    </dd>
    <dd style="margin-top:10px; padding:10px 0;border-top:1px solid #DDD;">
        <input type="radio" id="delete-reports" name="moderate-reports" value="delete-reports" checked="checked" />
        <label for="delete-reports"><?php echo $button_delete; ?></label>
        <?php if(!$pm_report_detail['report_closed']){ ?>
        <input type="radio" id="close-reports" name="moderate-reports" value="close-reports" />
        <label for="close-reports"><?php echo $button_close; ?></label>
        <?php } ?>
        &nbsp;&nbsp;
        <select name="other-actions">
            <option><?php echo $text_other_action; ?></option>
            <option value="b"><?php echo $text_ban_user; ?></option>
            <option value="w"><?php echo $text_warn_user; ?></option>
        </select>
        &nbsp;&nbsp;
        <input class="input-buttons" type="submit" name="submit" value="<?php echo $button_submit; ?>" />
        <span class="inline_error"><?php echo $error_report_details; ?></span><br /><br />
        <span style="display:none;" id="warning">
            <strong><?php echo $entry_warning_details; ?></strong><br />
            <textarea style="width:410px;height:100px;resize:none;" name="warning-details"><?php echo $warning_details; ?></textarea>
        </span>
        <span style="display:none;" id="ban">
            <select name="ban-length">
                <option value="p"><?php echo $text_permanent; ?></option>
                <option value="30m"><?php echo $text_thirty_minutes; ?></option>
                <option value="1h"><?php echo $text_one_hour; ?></option>
                <option value="6h"><?php echo $text_six_hours; ?></option>
                <option value="1d"><?php echo $text_one_day; ?></option>
                <option value="7d"><?php echo $text_seven_days; ?></option>
                <option value="2w"><?php echo $text_two_weeks; ?></option>
                <option value="1m"><?php echo $text_one_month; ?></option>
                <option value="u"><?php echo $text_until; ?></option>
            </select>
        <span id="until" style="display:none;">&nbsp;&nbsp;<input class="date" type="text" name="ban-date" value="<?php echo $ban_date; ?>" />&nbsp;(YYYY-MM-DD)</span><br /><br />
        <input style="width:326px;" type="text" name="ban-reason" value="<?php echo $ban_reason; ?>" />&nbsp;<?php echo $entry_ban_reason; ?><br /><br />
        <input style="width:326px;" type="text" name="ban-reason-shown" value="<?php echo $ban_reason_shown; ?>" />&nbsp;<?php echo $entry_ban_reason_shown; ?>
        </span>
    </dd>
</dl>
</form>
<script type="text/javascript"><!--
$('select[name=\'other-actions\']').live('change', function() {
    if (this.value == 'b') {
        $('#warning').hide();
        $('#ban').show();
    } else if(this.value == 'w') {
        $('#warning').show();
        $('#ban').hide();
    }else {
        $('#warning').hide();
        $('#ban').hide();
    }
});
$('select[name=\'ban-length\']').live('change', function() {
    if (this.value == 'u') {
        $('#until').show();
    }else {
        $('#until').hide();
    }
});
//--></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript"><!--
if ($.browser.msie && $.browser.version == 6) {
    $('.date').bgIframe();
}

$('.date').datepicker({dateFormat: 'yy-mm-dd'});
//--></script>
<?php break; ?>
<?php case 'rm_or': ?>
<dl>
    <dd class="cp-header">
        <?php echo $text_open_report_intro; ?>
        <select id="fid" name="fid">
            <?php if($has_global_privilege){ ?>
            <option value=""><?php echo $text_all_forum; ?></option>
            <?php } ?>
            <?php foreach($forums as $forum){ ?>
            <option value="<?php echo $forum['forum_id']; ?>" <?php echo $forum_option_id==$forum['forum_id']?'selected="selected"':'' ?>><?php echo $forum['forum_name']; ?></option>
            <?php foreach($sub_forums[$forum['forum_id']] as $sub_forum){ ?>
                <option value="<?php echo $sub_forum['forum_id']; ?>" <?php echo $forum_option_id==$sub_forum['forum_id']?'selected="selected"':'' ?>>&nbsp;&nbsp;<?php echo $sub_forum['forum_name']; ?></option>
                <?php } ?>
            <?php } ?>
        </select>
    </dd>
    <dd class="cp-content">
        <?php if(!$open_reports){ ?>
        <dl>
            <dd><?php echo $text_no_reports; ?></dd>
        </dl>
        <?php }else{ ?>
        <form id="view-open-report-form" action="" method="post">
        <dl class="cp-list-heading">
            <dd class="cp-list-heading-first cp-list-first-unindent2"><?php echo $text_heading_view_details; ?></dd>
            <dd class="cp-list-heading-second cp-list-second-expand2"><?php echo $text_heading_reporter; ?></dd>
            <dd class="cp-list-heading-third"><?php echo $text_heading_mark; ?></dd>
        </dl>
        <?php foreach($open_reports as $open_report){ ?>
        <dl class="cp-list">
            <dd class="cp-list-first cp-list-first-unindent">
                <a href="<?php echo $open_report['report_moderating_link']; ?>"><strong><?php echo $open_report['post_subject']; ?></strong></a>
                <br />
                <?php echo $open_report['posted_by']; ?>
            </dd>
            <dd class="cp-list-second cp-list-second-expand">
                <?php echo $open_report['reported_by']; ?><br />
                <?php echo $text_forum; ?>
                <a href="<?php echo $open_report['fourm_link']; ?>"><?php echo $open_report['forum_name']; ?></a>
            </dd>
            <dd class="cp-list-third">
                <input type="checkbox" name="marked_r_id[]" value="<?php echo $open_report['id_str'] ; ?>" />
            </dd>
        </dl>
        <?php } ?>
        <dl class="cp-list-bottom">
            <dd>
                <input class="input-buttons" type="submit" name="delete-reports" value="<?php echo $button_delete; ?>" onclick="{if(confirm('<?php echo $text_confirm_delete; ?>')){this.document.view-open-report-form.submit();return true;}return false;}" />
                &nbsp;&nbsp;
                <input class="input-buttons" type="submit" name="close-reports" value="<?php echo $button_close; ?>" onclick="{if(confirm('<?php echo $text_confirm_close; ?>')){this.document.view-open-report-form.submit();return true;}return false;}" />
            </dd>
            <?php if(count($open_reports)>1){ ?>
            <dd style="float:left;">
                &bull; <a href="#" onclick="marklist('view-open-report-form', 'marked_r', true); return false;"><?php echo $text_mark_all; ?></a>
                &bull; <a href="#" onclick="marklist('view-open-report-form', 'marked_r', false); return false;"><?php echo $text_unmark_all; ?></a>
            </dd>
            <?php } ?>
        </dl>
        </form>
        <?php } ?>
    </dd>
    <div class="forum-pagination"><?php echo $pagination; ?></div>
</dl>
<script type="text/javascript"><!--
$('#fid').bind('change', function() {
url = 'index.php?route=community/mcp&mode=rm&action=or';

var keyword = $('.cp-header select[name=\'fid\']').attr('value');

if(keyword != ''){
    url += '&fid=' + encodeURIComponent(keyword);
}

location = url;
});
--></script>
<?php break; ?>
<?php case 'rm_cr': ?>
<dl>
    <dd class="cp-header">
        <?php echo $text_closed_report_intro; ?>
        <select id="fid" name="fid">
            <?php if($has_global_privilege){ ?>
            <option value=""><?php echo $text_all_forum; ?></option>
            <?php } ?>
            <?php foreach($forums as $forum){ ?>
            <option value="<?php echo $forum['forum_id']; ?>" <?php echo $forum_option_id==$forum['forum_id']?'selected="selected"':'' ?>><?php echo $forum['forum_name']; ?></option>
            <?php foreach($sub_forums[$forum['forum_id']] as $sub_forum){ ?>
                <option value="<?php echo $sub_forum['forum_id']; ?>" <?php echo $forum_option_id==$sub_forum['forum_id']?'selected="selected"':'' ?>>&nbsp;&nbsp;<?php echo $sub_forum['forum_name']; ?></option>
                <?php } ?>
            <?php } ?>
        </select>
    </dd>
    <dd class="cp-content">
        <?php if(!$closed_reports){ ?>
        <dl>
            <dd><?php echo $text_no_reports; ?></dd>
        </dl>
        <?php }else{ ?>
        <form id="view-closed-report-form" action="" method="post">
        <dl class="cp-list-heading">
            <dd class="cp-list-heading-first cp-list-first-unindent2"><?php echo $text_heading_view_details; ?></dd>
            <dd class="cp-list-heading-second cp-list-second-expand2"><?php echo $text_heading_reporter; ?></dd>
            <dd class="cp-list-heading-third"><?php echo $text_heading_mark; ?></dd>
        </dl>
        <?php foreach($closed_reports as $closed_report){ ?>
        <dl class="cp-list">
            <dd class="cp-list-first cp-list-first-unindent">
                <a href="<?php echo $closed_report['report_moderating_link']; ?>"><strong><?php echo $closed_report['post_subject']; ?></strong></a>
                <br />
                <?php echo $closed_report['posted_by']; ?>
            </dd>
            <dd class="cp-list-second cp-list-second-expand">
                <?php echo $closed_report['reported_by']; ?><br />
                <?php echo $text_forum; ?>
                <a href="<?php echo $closed_report['fourm_link']; ?>"><?php echo $closed_report['forum_name']; ?></a>
            </dd>
            <dd class="cp-list-third">
                <input type="checkbox" name="marked_r_id[]" value="<?php echo $closed_report['id_str'] ; ?>" />
            </dd>
        </dl>
        <?php } ?>
        <dl class="cp-list-bottom">
            <dd>
                <input class="input-buttons" type="submit" name="delete-reports" value="<?php echo $button_delete; ?>" onclick="{if(confirm('<?php echo $text_confirm_delete; ?>')){this.document.view-closed-report-form.submit();return true;}return false;}" />
            </dd>
            <?php if(count($closed_reports)>1){ ?>
            <dd style="float:left;">
                &bull; <a href="#" onclick="marklist('view-closed-report-form', 'marked_r', true); return false;"><?php echo $text_mark_all; ?></a>
                &bull; <a href="#" onclick="marklist('view-closed-report-form', 'marked_r', false); return false;"><?php echo $text_unmark_all; ?></a>
            </dd>
            <?php } ?>
        </dl>
        </form>
        <?php } ?>
    </dd>
    <div class="forum-pagination"><?php echo $pagination; ?></div>
</dl>
<script type="text/javascript"><!--
$('#fid').bind('change', function() {
url = 'index.php?route=community/mcp&mode=rm&action=cr';

var keyword = $('.cp-header select[name=\'fid\']').attr('value');

if(keyword != ''){
    url += '&fid=' + encodeURIComponent(keyword);
}

location = url;
});
--></script>
<?php break; ?>
<?php case 'rm_rd': ?>
<form id="report-detail-form" action="" method="post">
<dl>
    <dd class="cp-header">
        <span style="font-size:16px;font-weight:bold;"><?php echo $text_report_reason; ?><?php echo $report_detail['reason_title'] ; ?></span><br />
        <span class="gray-font"><?php echo $report_detail['reported_by']; ?></span><br /><br />
        <?php if($report_detail['report_closed']){ ?>
        <div class="closed-report-bar">
            <?php echo $text_report_closed; ?>
        </div>
        <?php } ?>
        <?php echo $report_detail['report_info']; ?>
        <input type="hidden" name="marked_r_id[]" value="<?php echo $report_detail['id_str'] ; ?>" />
    </dd>
    <dd class="cp-content">
        <span style="font-size:14px;font-weight:bold;"><a href="<?php echo $report_detail['post_link']; ?>"><?php echo $report_detail['post_subject']; ?></a></span><br />
        <span class="gray-font"><?php echo $report_detail['posted_by']; ?></span>
        <?php if($report_detail['post_deleted']){ ?>
        <br /><br />
        <div class="deleted-post-bar">
            <?php echo $text_post_deleted; ?>
        </div>
        <?php } ?>
        <?php echo $report_detail['post_text']; ?>
    </dd>
    <dd style="margin-top:10px; padding:10px 0;border-top:1px solid #DDD;">
        <input type="radio" id="delete-reports" name="moderate-reports" value="delete-reports" checked="checked" />
        <label for="delete-reports"><?php echo $button_delete; ?></label>
        <?php if(!$report_detail['report_closed']){ ?>
        <input type="radio" id="close-reports" name="moderate-reports" value="close-reports" />
        <label for="close-reports"><?php echo $button_close; ?></label>
        <?php } ?>
        <?php if(!$report_detail['post_deleted']){ ?>
        &nbsp;&nbsp;
        <input type="checkbox" id="delete-post" name="delete-post" value="" />
        <label for="delete-post"><?php echo $text_delete_post; ?></label>
        <?php } ?>
        &nbsp;&nbsp;
        <select name="other-actions">
            <option><?php echo $text_other_action; ?></option>
            <option value="b"><?php echo $text_ban_user; ?></option>
            <option value="w"><?php echo $text_warn_user; ?></option>
        </select>
        &nbsp;&nbsp;
        <input class="input-buttons" type="submit" name="submit" value="<?php echo $button_submit; ?>" />
        <span class="inline_error"><?php echo $error_report_details; ?></span><br /><br />
    <span style="display:none;" id="warning">
        <strong><?php echo $entry_warning_details; ?></strong><br />
        <textarea style="width:410px;height:100px;resize:none;" name="warning-details"><?php echo $warning_details; ?></textarea>
    </span>
    <span style="display:none;" id="ban">
        <select name="ban-length">
            <option value="p"><?php echo $text_permanent; ?></option>
            <option value="30m"><?php echo $text_thirty_minutes; ?></option>
            <option value="1h"><?php echo $text_one_hour; ?></option>
            <option value="6h"><?php echo $text_six_hours; ?></option>
            <option value="1d"><?php echo $text_one_day; ?></option>
            <option value="7d"><?php echo $text_seven_days; ?></option>
            <option value="2w"><?php echo $text_two_weeks; ?></option>
            <option value="1m"><?php echo $text_one_month; ?></option>
            <option value="u"><?php echo $text_until; ?></option>
        </select>
    <span id="until" style="display:none;">&nbsp;&nbsp;<input class="date" type="text" name="ban-date" value="<?php echo $ban_date; ?>" />&nbsp;(YYYY-MM-DD)</span><br /><br />
    <input style="width:326px;" type="text" name="ban-reason" value="<?php echo $ban_reason; ?>" />&nbsp;<?php echo $entry_ban_reason; ?><br /><br />
    <input style="width:326px;" type="text" name="ban-reason-shown" value="<?php echo $ban_reason_shown; ?>" />&nbsp;<?php echo $entry_ban_reason_shown; ?>
    </span>
    </dd>
</dl>
</form>
<script type="text/javascript"><!--
$('select[name=\'other-actions\']').live('change', function() {
    if (this.value == 'b') {
        $('#warning').hide();
        $('#ban').show();
    } else if(this.value == 'w') {
        $('#warning').show();
        $('#ban').hide();
    }else {
        $('#warning').hide();
        $('#ban').hide();
    }
});
$('select[name=\'ban-length\']').live('change', function() {
    if (this.value == 'u') {
        $('#until').show();
    }else {
        $('#until').hide();
    }
});
//--></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript"><!--
if ($.browser.msie && $.browser.version == 6) {
    $('.date').bgIframe();
}

$('.date').datepicker({dateFormat: 'yy-mm-dd'});
//--></script>
<?php break; ?>
<?php } ?>